home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / content / nsIChromeRegistry.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  8KB  |  257 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIChromeRegistry.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIChromeRegistry_h__
  6. #define __gen_nsIChromeRegistry_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIURI; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIChromeRegistry */
  21. #define NS_ICHROMEREGISTRY_IID_STR "68389281-f6d0-4533-841d-344a2018140c"
  22.  
  23. #define NS_ICHROMEREGISTRY_IID \
  24.   {0x68389281, 0xf6d0, 0x4533, \
  25.     { 0x84, 0x1d, 0x34, 0x4a, 0x20, 0x18, 0x14, 0x0c }}
  26.  
  27. class NS_NO_VTABLE nsIChromeRegistry : public nsISupports {
  28.  public: 
  29.  
  30.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICHROMEREGISTRY_IID)
  31.  
  32.   enum { NONE = 0 };
  33.  
  34.   enum { PARTIAL = 1 };
  35.  
  36.   enum { FULL = 2 };
  37.  
  38.   /**
  39.    * Resolve a chrome URL to an loadable URI using the information in the
  40.    * registry. Does not modify aChromeURL.
  41.    *
  42.    * Chrome URLs are allowed to be specified in "shorthand", leaving the
  43.    * "file" portion off. In that case, the URL is expanded to:
  44.    *
  45.    *   chrome://package/provider/package.ext
  46.    *
  47.    * where "ext" is:
  48.    *
  49.    *   "xul" for a "content" package,
  50.    *   "css" for a "skin" package, and
  51.    *   "dtd" for a "locale" package.
  52.    *
  53.    * @param aChromeURL the URL that is to be converted.
  54.    */
  55.   /* nsIURI convertChromeURL (in nsIURI aChromeURL); */
  56.   NS_IMETHOD ConvertChromeURL(nsIURI *aChromeURL, nsIURI **_retval) = 0;
  57.  
  58.   /**
  59.    * refresh the chrome list at runtime, looking for new packages/etc
  60.    */
  61.   /* void checkForNewChrome (); */
  62.   NS_IMETHOD CheckForNewChrome(void) = 0;
  63.  
  64. };
  65.  
  66. /* Use this macro when declaring classes that implement this interface. */
  67. #define NS_DECL_NSICHROMEREGISTRY \
  68.   NS_IMETHOD ConvertChromeURL(nsIURI *aChromeURL, nsIURI **_retval); \
  69.   NS_IMETHOD CheckForNewChrome(void); 
  70.  
  71. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  72. #define NS_FORWARD_NSICHROMEREGISTRY(_to) \
  73.   NS_IMETHOD ConvertChromeURL(nsIURI *aChromeURL, nsIURI **_retval) { return _to ConvertChromeURL(aChromeURL, _retval); } \
  74.   NS_IMETHOD CheckForNewChrome(void) { return _to CheckForNewChrome(); } 
  75.  
  76. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  77. #define NS_FORWARD_SAFE_NSICHROMEREGISTRY(_to) \
  78.   NS_IMETHOD ConvertChromeURL(nsIURI *aChromeURL, nsIURI **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConvertChromeURL(aChromeURL, _retval); } \
  79.   NS_IMETHOD CheckForNewChrome(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CheckForNewChrome(); } 
  80.  
  81. #if 0
  82. /* Use the code below as a template for the implementation class for this interface. */
  83.  
  84. /* Header file */
  85. class nsChromeRegistry : public nsIChromeRegistry
  86. {
  87. public:
  88.   NS_DECL_ISUPPORTS
  89.   NS_DECL_NSICHROMEREGISTRY
  90.  
  91.   nsChromeRegistry();
  92.  
  93. private:
  94.   ~nsChromeRegistry();
  95.  
  96. protected:
  97.   /* additional members */
  98. };
  99.  
  100. /* Implementation file */
  101. NS_IMPL_ISUPPORTS1(nsChromeRegistry, nsIChromeRegistry)
  102.  
  103. nsChromeRegistry::nsChromeRegistry()
  104. {
  105.   /* member initializers and constructor code */
  106. }
  107.  
  108. nsChromeRegistry::~nsChromeRegistry()
  109. {
  110.   /* destructor code */
  111. }
  112.  
  113. /* nsIURI convertChromeURL (in nsIURI aChromeURL); */
  114. NS_IMETHODIMP nsChromeRegistry::ConvertChromeURL(nsIURI *aChromeURL, nsIURI **_retval)
  115. {
  116.     return NS_ERROR_NOT_IMPLEMENTED;
  117. }
  118.  
  119. /* void checkForNewChrome (); */
  120. NS_IMETHODIMP nsChromeRegistry::CheckForNewChrome()
  121. {
  122.     return NS_ERROR_NOT_IMPLEMENTED;
  123. }
  124.  
  125. /* End of implementation class template. */
  126. #endif
  127.  
  128.  
  129. /* starting interface:    nsIXULChromeRegistry */
  130. #define NS_IXULCHROMEREGISTRY_IID_STR "3e51f40b-b4b0-4e60-ac45-6c63477ebe41"
  131.  
  132. #define NS_IXULCHROMEREGISTRY_IID \
  133.   {0x3e51f40b, 0xb4b0, 0x4e60, \
  134.     { 0xac, 0x45, 0x6c, 0x63, 0x47, 0x7e, 0xbe, 0x41 }}
  135.  
  136. class NS_NO_VTABLE nsIXULChromeRegistry : public nsIChromeRegistry {
  137.  public: 
  138.  
  139.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXULCHROMEREGISTRY_IID)
  140.  
  141.   /* void reloadChrome (); */
  142.   NS_IMETHOD ReloadChrome(void) = 0;
  143.  
  144.   /* ACString getSelectedLocale (in ACString packageName); */
  145.   NS_IMETHOD GetSelectedLocale(const nsACString & packageName, nsACString & _retval) = 0;
  146.  
  147.   /* void refreshSkins (); */
  148.   NS_IMETHOD RefreshSkins(void) = 0;
  149.  
  150.   /**
  151.    * Installable skin XBL is not always granted the same privileges as other
  152.    * chrome. This asks the chrome registry whether scripts are allowed to be
  153.    * run for a particular chrome URI. Do not pass non-chrome URIs to this
  154.    * method.
  155.    */
  156.   /* boolean allowScriptsForPackage (in nsIURI url); */
  157.   NS_IMETHOD AllowScriptsForPackage(nsIURI *url, PRBool *_retval) = 0;
  158.  
  159. };
  160.  
  161. /* Use this macro when declaring classes that implement this interface. */
  162. #define NS_DECL_NSIXULCHROMEREGISTRY \
  163.   NS_IMETHOD ReloadChrome(void); \
  164.   NS_IMETHOD GetSelectedLocale(const nsACString & packageName, nsACString & _retval); \
  165.   NS_IMETHOD RefreshSkins(void); \
  166.   NS_IMETHOD AllowScriptsForPackage(nsIURI *url, PRBool *_retval); 
  167.  
  168. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  169. #define NS_FORWARD_NSIXULCHROMEREGISTRY(_to) \
  170.   NS_IMETHOD ReloadChrome(void) { return _to ReloadChrome(); } \
  171.   NS_IMETHOD GetSelectedLocale(const nsACString & packageName, nsACString & _retval) { return _to GetSelectedLocale(packageName, _retval); } \
  172.   NS_IMETHOD RefreshSkins(void) { return _to RefreshSkins(); } \
  173.   NS_IMETHOD AllowScriptsForPackage(nsIURI *url, PRBool *_retval) { return _to AllowScriptsForPackage(url, _retval); } 
  174.  
  175. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  176. #define NS_FORWARD_SAFE_NSIXULCHROMEREGISTRY(_to) \
  177.   NS_IMETHOD ReloadChrome(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReloadChrome(); } \
  178.   NS_IMETHOD GetSelectedLocale(const nsACString & packageName, nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSelectedLocale(packageName, _retval); } \
  179.   NS_IMETHOD RefreshSkins(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->RefreshSkins(); } \
  180.   NS_IMETHOD AllowScriptsForPackage(nsIURI *url, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->AllowScriptsForPackage(url, _retval); } 
  181.  
  182. #if 0
  183. /* Use the code below as a template for the implementation class for this interface. */
  184.  
  185. /* Header file */
  186. class nsXULChromeRegistry : public nsIXULChromeRegistry
  187. {
  188. public:
  189.   NS_DECL_ISUPPORTS
  190.   NS_DECL_NSIXULCHROMEREGISTRY
  191.  
  192.   nsXULChromeRegistry();
  193.  
  194. private:
  195.   ~nsXULChromeRegistry();
  196.  
  197. protected:
  198.   /* additional members */
  199. };
  200.  
  201. /* Implementation file */
  202. NS_IMPL_ISUPPORTS1(nsXULChromeRegistry, nsIXULChromeRegistry)
  203.  
  204. nsXULChromeRegistry::nsXULChromeRegistry()
  205. {
  206.   /* member initializers and constructor code */
  207. }
  208.  
  209. nsXULChromeRegistry::~nsXULChromeRegistry()
  210. {
  211.   /* destructor code */
  212. }
  213.  
  214. /* void reloadChrome (); */
  215. NS_IMETHODIMP nsXULChromeRegistry::ReloadChrome()
  216. {
  217.     return NS_ERROR_NOT_IMPLEMENTED;
  218. }
  219.  
  220. /* ACString getSelectedLocale (in ACString packageName); */
  221. NS_IMETHODIMP nsXULChromeRegistry::GetSelectedLocale(const nsACString & packageName, nsACString & _retval)
  222. {
  223.     return NS_ERROR_NOT_IMPLEMENTED;
  224. }
  225.  
  226. /* void refreshSkins (); */
  227. NS_IMETHODIMP nsXULChromeRegistry::RefreshSkins()
  228. {
  229.     return NS_ERROR_NOT_IMPLEMENTED;
  230. }
  231.  
  232. /* boolean allowScriptsForPackage (in nsIURI url); */
  233. NS_IMETHODIMP nsXULChromeRegistry::AllowScriptsForPackage(nsIURI *url, PRBool *_retval)
  234. {
  235.     return NS_ERROR_NOT_IMPLEMENTED;
  236. }
  237.  
  238. /* End of implementation class template. */
  239. #endif
  240.  
  241. #define NS_CHROMEREGISTRY_CONTRACTID \
  242.   "@mozilla.org/chrome/chrome-registry;1"
  243. /**
  244.  * Chrome registry will notify various caches that all chrome files need
  245.  * flushing.
  246.  */
  247. #define NS_CHROME_FLUSH_TOPIC \
  248.   "chrome-flush-caches"
  249. /**
  250.  * Chrome registry will notify various caches that skin files need flushing.
  251.  * If "chrome-flush-caches" is notified, this topic will *not* be notified.
  252.  */
  253. #define NS_CHROME_FLUSH_SKINS_TOPIC \
  254.   "chrome-flush-skin-caches"
  255.  
  256. #endif /* __gen_nsIChromeRegistry_h__ */
  257.